import 'package:flutter/material.dart';
import 'package:fluro/fluro.dart';
import './router_handler.dart';

class Routers {
  /// 根目录
  static String root = "/";

  /// 滑动删除demo
  static String slideDeleteItemPage = "/slideDeleteItemPage";

  /// 右滑退出页面demo
  static String rightSlideBackPage = "/rightSlideBackPage";

  /// Provider状态管理demo
  static String providerDemoPage = "/providerDemoPage";

  /// BottomNavigationBar切换demo
  static String bottomNavigationBarPage = "/bottomNavigationBarPage";

  /// BottomAppBar
  static String bottomAppBarPage = "/bottomAppBarPage";

  /// 毛玻璃效果
  static String rostedGlassPage = "/rostedGlassPage";

  /// Animation
  static String animaitonPage = "/animaitonPage";

  /// SplashDemoList
  static String splashDemoListPage = "/splashDemoListPage";

  /// splashPage1
  static String splashPage1 = "/splashPage1";

  static void configureRouters(Router router) {
    router.notFoundHandler = new Handler(
        handlerFunc: (BuildContext context, Map<String, List<String>> params) {
      print('ERROR====>ROUTE WAS NOT FONUND!!!');
    });

    router.define(slideDeleteItemPage, handler: slideDeleteItemPageHandler);

    router.define(rightSlideBackPage,
        handler: rightSlideBackPageHandler,
        transitionType: TransitionType.cupertino);

    router.define(providerDemoPage, handler: providerDemoPageHandler);

    router.define(bottomNavigationBarPage,
        handler: bottomNavigationBarPageHandler);

    router.define(bottomAppBarPage, handler: bottomAppBarPageHandler);

    router.define(rostedGlassPage, handler: rostedGlassPageHandler);

    router.define(animaitonPage, handler: animationPageHandler);

    router.define(splashDemoListPage, handler: splashDemoListPageHandler);

    router.define(splashPage1, handler: splashPage1Handler);
  }
}
